feat(ui): add hover and active states for Card component#1797
Merged
Conversation
Signed-off-by: MartinS-git <info@eyepic.de>
🦋 Changeset detectedLatest commit: 5159a3c The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Signed-off-by: MartinS-git <info@eyepic.de>
64 tasks
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds interactive hover/active styling for the Card component when rendered as a <button> (via onClick) or <a> (via href), introducing new theme tokens intended to drive the hover border color and updating stories/tests accordingly.
Changes:
- Add conditional “interactive” Tailwind utility classes to
Card(hover border + hover shadow + active accent border + pointer cursor). - Introduce new CSS variables/token chain for the card hover border color.
- Add Storybook story and Vitest assertions for interactive styling behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/global.css | Adds new theme token for card hover border and supporting color variables; also changes hover shadow token value. |
| packages/ui-components/src/components/Card/Card.component.tsx | Applies interactive hover/active classes only when href/onClick is set and not disabled. |
| packages/ui-components/src/components/Card/Card.test.tsx | Adds tests asserting interactive class application / non-application. |
| packages/ui-components/src/components/Card/Card.stories.tsx | Adds an interactive story to manually verify hover/active states. |
| .changeset/card-hover-active-states.md | Declares a minor release for the new interactive Card styling. |
…rage Signed-off-by: MartinS-git <info@eyepic.de>
edda
previously approved these changes
Jun 25, 2026
franzheidl
previously requested changes
Jun 25, 2026
Signed-off-by: MartinS-git <info@eyepic.de>
edda
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds interactive hover and active states to the
Cardcomponent when rendered as a<button>(viaonClick) or<a>(viahref).border-theme-card-hover) + stronger box shadowborder-theme-accent)cursor-not-allowedstill overrides whendisabled<div>) are unaffectedNew CSS variables added to
global.css:--color-border-high(light:grey-light-9, dark:grey-blue-1)--color-card-border-hover(component token)--border-color-theme-card-hover(theme token)Related Issues
Closes #1796
Checklist
PR Manifesto
Review the PR Manifesto for best practises.